home *** CD-ROM | disk | FTP | other *** search
- /* ReadConfig by Neil Bothwick */
- /* Reads ppp0.config and DialScript to determine various configuration values */
-
- options results
-
- if open(ppp,'ENV:sana2/ppp0.config','R') then do
- do until left(cfgline,1) ~= '#'
- cfgline = readln(ppp)
- end
- /* serial.device 0 57600 194.119.174.218 MTU=1500 CD 7WIRE EOFMODE DialScript=AmiTCP:db/DialScript */
- parse var cfgline Device Unit Speed .
-
- call close(ppp)
- end
-
- if open(ds,'AmiTCP:db/DialScript','R') then do
- do until eof(ds)
- NextLine = readln(ds)
- select
- when upper(left(NextLine,10)) = 'SEND "ATDT' then PopNum = substr(NextLine,11)
- when pos('assword:',NextLine) > 0 then do
- do until upper(left(NextLine,4)) = 'SEND'
- NextLine = readln(ds)
- end
- parse var NextLine a '"' PassWord '"' .
- end
- otherwise nop
- end
- end
- end
-
- address command
- if symbol('Device') = 'VAR' then 'setenv WirenetUpdateDevice' compress(Device,'"')
- if symbol('Unit') = 'VAR' then 'setenv WirenetUpdateUnit' compress(Unit,'"')
- if symbol('Speed') = 'VAR' then 'setenv WirenetUpdateSpeed' compress(Speed,'"')
- if symbol('PopNum') = 'VAR' then 'setenv WirenetUpdatePopNum' compress(PopNum,'"')
- if symbol('Password') = 'VAR' then 'setenv WirenetUpdatePassword' compress(Password,'"')
-
-
-
-
-
-